//引入Vue
import Vue from 'vue'
//引入App
import App from './App.vue'
//引入VueRouter
import VueRouter from 'vue-router'
//引入路由器
import router from './router'
//引入store
import store from './store'
//引入element组件库
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
//引入MockServer.js---mock数据
import './mock/mockServe';
//全局组件
import TypeNav from '@/components/TypeNav';//二级分类组件
import Pagination from '@/components/Pagination';//分页器组件
//引入表单校验组件
import "@/utils/validate"
//使用全局组件
Vue.component(TypeNav.name, TypeNav);
Vue.component(Pagination.name, Pagination);
//引入节流方法
import throttle from './utils/throttle'
Vue.use(throttle)
//关闭Vue的生产提示
Vue.config.productionTip = false
//应用VueRouter组件
Vue.use(VueRouter)
Vue.use(ElementUI)
new Vue({
  render: h => h(App),
  //全局事件总线$bus
  beforeCreate() {
    Vue.prototype.$bus = this;
  },
  router,//引入路由器
  store,
}).$mount('#app')
